﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmMateriales.aspx.cs" Inherits="Crosland.Automotriz.Web.Repuestos.wFrmMateriales" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
    TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">
    <style type="text/css">
        .tabla
        {
            margin: 1em;
        }
        .der
        {
            padding-right: 1em;
        }
    </style>
    <script type="text/javascript">
        function ShowMsj() {

            popupMsj.Show();
        }

    </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="98%" 
                HeaderText="Actualizar materiales" CssClass="tabla" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
                GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                <HeaderStyle>
                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                </HeaderStyle>
                <PanelCollection>
                    <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                        <table width="100%">
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxButton ID="btnNuevo" runat="server" Text="Nuevo" Width="100px" OnClick="AgregarMaterial" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <Image Url="~/Images/bt_new_button.gif">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnModificar" runat="server" Text="Modificar" Width="100px" OnClick="ModificarMaterial" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <Image Url="~/Images/edit2.gif">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnLimpiar" runat="server" Text="Limpiar Filtros" Width="150px" OnClick="LimpiarFiltros" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <Image Url="~/Images/limpiar3.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnMaterialesAsignar" runat="server" Text="Materiales por Asignar" Width="200px" OnClick="MaterialesxAsignar" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <Image Url="~/Images/add2.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnSalir" runat="server" Text="Salir" Width="100px" OnClick="Salir" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <Image Url="~/Images/logout.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td class="der">
                                                Código
                                            </td>
                                            <td class="der">
                                                <dx:ASPxTextBox ID="txtCodMaterial" runat="server" Width="170px" 
                                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                    CssPostfix="Office2010Blue" 
                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td class="der">
                                                Nro Ruedas
                                            </td>
                                            <td class="der">
                                                <dx:ASPxComboBox ID="cboRuedas" runat="server" AutoPostBack="false" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <Items>
                                                        <dx:ListEditItem Text="2R" Value="2R" />
                                                        <dx:ListEditItem Text="3R" Value="3R" />
                                                        <dx:ListEditItem Text="4R" Value="4R" />
                                                        <dx:ListEditItem Text="NN" Value="NN" />
                                                    </Items>
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <ButtonStyle Width="13px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxComboBox>
                                            </td>
                                            <td class="der">
                                                Marca
                                            </td>
                                            <td class="der">
                                                <dx:ASPxComboBox ID="cboMarca" runat="server" AutoPostBack="false" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" IncrementalFilteringMode="Contains"
                                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <ButtonStyle Width="13px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxComboBox>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnConsultar" runat="server" 
                                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                    CssPostfix="Office2010Blue" OnClick="ConsultarMaterial" 
                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Consultar" 
                                                    Width="100px">
                                                    <Image Url="~/Images/search.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="der">
                                                Modelo
                                            </td>
                                            <td class="der">
                                                <dx:ASPxComboBox ID="cboModelo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains"
                                                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <ButtonStyle Width="13px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxComboBox>
                                            </td>
                                            <td class="der">
                                                Sector
                                            </td>
                                            <td class="der">
                                                <dx:ASPxComboBox ID="cboSector" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains"
                                                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <ButtonStyle Width="13px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxComboBox>
                                            </td>
                                            <td class="der">
                                                Grupo Artículo
                                            </td>
                                            <td class="der">
                                                <dx:ASPxComboBox ID="cboGrupoArticulo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" Spacing="0"
                                                    IncrementalFilteringMode="Contains" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <ButtonStyle Width="13px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxComboBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxGridView ID="grdMaterial" runat="server" Width="100%" AutoGenerateColumns="False" ClientInstanceName="grdMaterial" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" KeyFieldName="ID_MATERIAL" OnPageIndexChanged="grdMaterial_PageIndexChanged1" OnAfterPerformCallback="grdMaterial_AfterPerformCallback">
                                        <Columns>
                                            <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0">
                                                <ClearFilterButton Visible="True">
                                                </ClearFilterButton>
                                            </dx:GridViewCommandColumn>
                                            <dx:GridViewDataTextColumn Caption="IdMaterial" FieldName="ID_MATERIAL" 
                                                ShowInCustomizationForm="True" Visible="False" VisibleIndex="1">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Código" FieldName="COD_MATERIAL" 
                                                ShowInCustomizationForm="True" VisibleIndex="2">
                                                <Settings AutoFilterCondition="Contains" />
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Descripción" FieldName="DES_MATERIAL" 
                                                ShowInCustomizationForm="True" VisibleIndex="3" Width="250px">
                                                <Settings AutoFilterCondition="Contains" />
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Grupo Artículo" 
                                                FieldName="DES_GRUPO_ARTICULO" ShowInCustomizationForm="True" 
                                                VisibleIndex="4" Width="200px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Sector" FieldName="DES_SECTOR" 
                                                ShowInCustomizationForm="True" VisibleIndex="5">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Jerarquia" FieldName="DES_JERARQUIA" 
                                                ShowInCustomizationForm="True" VisibleIndex="6">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Marca" FieldName="DES_MARCA" 
                                                ShowInCustomizationForm="True" VisibleIndex="7">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" 
                                                ShowInCustomizationForm="True" VisibleIndex="8">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="asignado" FieldName="IND_ASIGNADO" 
                                                ShowInCustomizationForm="True" Visible="False" VisibleIndex="10">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Fec.registro" FieldName="FEC_CREACION" 
                                                ShowInCustomizationForm="True" VisibleIndex="9">
                                                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <SettingsBehavior AllowFocusedRow="True" />
                                        <SettingsPager PageSize="20">
                                        </SettingsPager>
                                        <Settings ShowFilterRow="True" />
                                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanelOnStatusBar>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </Images>
                                        <ImagesFilterControl>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </ImagesFilterControl>
                                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                            </Header>
                                            <LoadingPanel ImageSpacing="5px">
                                            </LoadingPanel>
                                        </Styles>
                                        <StylesPager>
                                            <PageNumber ForeColor="#3E4846">
                                            </PageNumber>
                                            <Summary ForeColor="#1E395B">
                                            </Summary>
                                        </StylesPager>
                                        <StylesEditors ButtonEditCellSpacing="0">
                                            <ProgressBar Height="21px">
                                            </ProgressBar>
                                        </StylesEditors>
                                    </dx:ASPxGridView>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                        </table>
                        <div id="PopUp">
                            <dx:ASPxPopupControl ID="popupMsj" runat="server" AllowDragging="True" ClientInstanceName="popupMsj" CloseAction="None" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                CssPostfix="PlasticBlue" EnableViewState="False" HeaderText="Mensaje" LoadingPanelText="Cargando&amp;hellip;" Modal="True" PopupHorizontalAlign="WindowCenter"
                                PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px">
                                <HeaderImage Url="~/Images/icon_message.png">
                                </HeaderImage>
                                <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                                </LoadingPanelImage>
                                <CloseButtonStyle>
                                    <Paddings Padding="0px" />
                                </CloseButtonStyle>
                                <ContentStyle>
                                    <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                                </ContentStyle>
                                <HeaderStyle>
                                    <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" PaddingTop="4px" />
                                    <Paddings PaddingLeft="10px" PaddingTop="4px" PaddingRight="4px" PaddingBottom="4px" />
                                </HeaderStyle>
                                <ContentCollection>
                                    <dx:PopupControlContentControl ID="PopupControlContentControl5" runat="server" SupportsDisabledAttribute="True">
                                        <br />
                                        <dx:ASPxPanel ID="ASPxPanel2" runat="server" DefaultButton="btCreate">
                                            <PanelCollection>
                                                <dx:PanelContent ID="Panelpopup" runat="server">
                                                    <table align="center">
                                                        <tr>
                                                            <td colspan="2">
                                                                <dx:ASPxLabel ID="lblmsj" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                                                </dx:ASPxLabel>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table align="center">
                                                        <tr>
                                                            <td align="center" style="width: 215px">
                                                                <dx:ASPxButton ID="ASPxButton1" runat="server" Text="Aceptar" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                                    <ClientSideEvents Click="function(s, e) {popupMsj.Hide();}" />
                                                                    <Image Url="~/Images/ok.png">
                                                                    </Image>
                                                                </dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </dx:PanelContent>
                                            </PanelCollection>
                                        </dx:ASPxPanel>
                                    </dx:PopupControlContentControl>
                                </ContentCollection>
                            </dx:ASPxPopupControl>
                        </div>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
